package com.thor.palmmall.rest.order.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.order.AProductConditionFilter;
import com.thor.palmmall.spi.order.SProductConditionFilter;

public class SProductConditionFilterConverter  implements Converter<AProductConditionFilter,SProductConditionFilter>{
	private static SProductConditionFilterConverter instance;
	public static SProductConditionFilterConverter getInstance() {
		if (instance == null)
			instance = new SProductConditionFilterConverter();
		return instance;
	}
	@Override
	public SProductConditionFilter convert(AProductConditionFilter source) {
		SProductConditionFilter target = new SProductConditionFilter();
		target.setStoreUuid(source.getStoreUuid());
		target.setTenantUuid(source.getTenantUuid());
		target.setContractUuid(source.getContractUuid());
		target.setKeyword(source.getKeyword());
		target.setKeywordCustomKeys("model,specification");
		target.setState(source.getState());
		return target;
	}
}
